import { createStore, applyMiddleware, combineReducers, compose } from 'redux'
import thunk from 'redux-thunk'

import reducer from './reducer/index'

const reduxDevTools = window.devToolsExtension ? 
                        window.devToolsExtension() : () => {}

// 创建仓库
const store = createStore(
    combineReducers({
        login: reducer
    }),
    compose(
        applyMiddleware(thunk),
        reduxDevTools,
    )
);

export default store;
